package GDoc::Job::Fetch::US::Legi::GPO::House::Hearings;

use Moose;
use WWW::Mechanize;
use XML::LibXML;

use GDoc::Job;

extends 'GDoc::Job::Fetch::US::Legi::GPO::House';

has '_basekey' => ( is       => 'ro',
                    init_arg => undef,
                    default  => 'us/legi/house/%s/hearings/%s'
                  );

has '_basemeta'=> ( is       => 'ro',
                    init_arg => undef,
                    default  => 'us/legi/house/%s/hearings/meta/%s'
                  );

sub setup { 
    my $self = shift;
   
    $self->_baseurl( 'http://www.gpo.gov/fdsys/browse/committeecong.action?collection=CHRG&committee=%s&chamber=house&congressplus=%s' );

    $self->_basedir( 'http://www.gpo.gov/fdsys/' );
}

sub _ident { 
    my $self = shift;
    my $meta = shift;
    my $data = shift;

    my $cong = $meta->{congress};
    my $num  = $meta->{snum};

    my $ident    = sprintf( 'HHRG-%03d-%04d', $cong, $num ); 

    return $ident;
}


1;
